function setConfig(dataCombine) {
  dataCombine.config({
    // startParentTag : '[[',
    // endParentTag : ']]',
    // startArrayTag : '[',
    // endArrayTag : ']',
    // syntacticEndingChar: ':',
  });

  //工具集 可在指令方法中使用
  dataCombine.store({
    toNumber: function(str){
      return Number(str);
    }
  });

  /**
   * 依赖器
   */
  dataCombine.relyCommand({
    isNumber: function () {
      var val = this.target.value;
      return !isNaN(this.store.toNumber(val));
    },
    between: function (min, max) {
      var val = this.store.toNumber(this.target.value);
      return val > min && val < max;
    },
    testGetParent: function(){
      var val = this.target.value;
      var getParent = this.getParent;
      
      var parent = getParent();
      if(parent != null){
        var pargetVal = Array.isArray(parent) ? parent[0] : parent.value;
        if(val.substring(0, val.length - 1) !== pargetVal){
          console.log('relyCommand');
          throw 'getParent error';
        }
      }

      return true;
    },
    isMan: function () {
      var val = this.target.value;
      if(val >= 18){
        return true;
      } else {
        this.interrupt(true);
      }
    }
  });

  /**
   * 取值器
   */
  dataCombine.pickCommand({
    addSome: function (str) {
      str == null && (str = '');
      var target = this.target;
      var val = target.value;
      return val + str;
    },
    double: function () {
      var target = this.target;
      var val = target.value;
      return val + val;
    },
    toNull: function () {
      return null;
    },
    getAttr: function (attrName) {
      var target = this.target;
      return target.getAttribute(attrName) || undefined;
    },
    empty2undefined: function () {
      return this.target.value || undefined;
    },
    toInterrupt: function () {
      this.interrupt(true);
    },
    testGetParent: function(){
      var val = this.target.value;
      var getParent = this.getParent;
      
      var parent = getParent();
      if(parent != null){
        var pargetVal = Array.isArray(parent) ? parent[0] : parent.value;
        if(val.substring(0, val.length - 1) !== pargetVal){
          console.log('pickCommand');
          throw 'getParent error';
        }
      }

      return val;
    }
  });

  /**
   * 转换器
   * 第一个参数为目标值，后面的参数依次为传入的值
   * 自带convert转换器只有string(默认)和number，可被覆盖
   */
  dataCombine.convertCommand({
    length: function (val, num) {
      return val.substring(0, this.store.toNumber(num));
    },
    date: function (val) {
      return val.substring(0, 10);
    },
    split: function (val) {
      return val.split(',');
    },
    toUndefined: function () {
      return undefined;
    },
    testGetParent: function(targetVal){
      var val = this.target.value;
      var getParent = this.getParent;
      
      var parent = getParent();
      if(parent != null){
        var pargetVal = Array.isArray(parent) ? parent[0] : parent.value;
        if(targetVal !== val || val.substring(0, val.length - 1) !== pargetVal){
          console.log('convertCommand');
          throw 'getParent error';
        }
      }

      return targetVal;
    }
  });

  /**
   * “层级器”
   */
  dataCombine.levelCommand({
    reverse: function (arr, addOne) {
      addOne && arr.push(addOne);
      return arr.reverse();
    },
  });
}

if (typeof module === 'object' && typeof module.exports === 'object') {
  module.exports = setConfig;
} else {
  window.setConfig = setConfig;
}
